<!-- 我的记录 -->

<template>
  <WebTable
    class="DetailMeetingRoom-MyRecord"
    path="record"
    noPage
    auto
    :elProps="{ highlightCurrentRow: true }"
    @cell-mouse-enter="cellMouseEnter"
    @cell-mouse-leave="cellMouseLeave"
  >
    <RowTime label="申请时间" bind="applyTime" />

    <RowText label="申请人" bind="applyUserName" />

    <RowTree
      :label="`所属${CORE.MAP.ORGAN}`"
      bind="applyUserDeptId, applyUserDeptName"
      :dict="CORE.ORGAN.DICT"
      :minWidth="120"
    />

    <RowText label="预约时间" bind="times" :width="120" />

    <RowText label="参会人员" bind="userNames" :minWidth="160" />

    <RowText label="会议内容" bind="content" :minWidth="200" />

    <RowStatus bind="auditStatus" />

    <RowOperate :btns="record_MAP.BTNS" :width="80" />
  </WebTable>
</template>

<script>
// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'

// ============================== 导出组件 ============================== //

export default {
  /**
   * 名称定义 (实际使用名称)
   */
  name: 'MyRecord',

  /**
   * 混入列表 (配置选项合并)
   */
  mixins: [CORE.mixWeb(), CORE.mixWeb('record', 'record_')],

  /**
   * 本地方法 (轻量重要在前)
   */
  methods: {
    /**
     * 切换选中行
     */
    changeCurrent(row = {}) {
      this.MAP.hoverId = row.id || ''
    },

    /**
     * 单元格鼠标进入
     */
    cellMouseEnter(row = {}) {
      this.MAP.hoverId = row.id || ''
      this.record_refTable.setCurrentRow(row)
    },

    /**
     * 单元格鼠标离开
     */
    cellMouseLeave() {
      this.MAP.hoverId = ''
    },
  },
}
</script>

<style lang="scss">
@import './index.scss';
</style>
